import Vue from 'vue'
import Router from 'vue-router'
import ImageUpload from '@/components/ImageUpload/index.vue';

Vue.component('image-upload', ImageUpload);


Vue.use(Router)

//login
import LoginPage from "@/components/view/login/loginPage.vue";
import RegisterPage from "@/components/view/login/registerPage.vue"

// homepage
import HomeIndex from '@/components/view/homepage/homeIndex.vue'
import OnCar from "@/components/view/homepage/onCar.vue";
import GetOrder from "@/components/view/homepage/getOrder.vue"
import ItineraryDetails from "@/components/view/homepage/itineraryDetails.vue"
import Nearby from "@/components/view/homepage/nearby.vue"
import SecurityCenter from "@/components/view/homepage/securityCenter.vue";
import ArriveAtDestination from "@/components/view/homepage/arriveAtDestination.vue";
import EndOrder from "@/components/view/homepage/endOrder.vue";


// historyorder
import HistoryIndex from "@/components/view/historyorder/historyIndex.vue"
import FeedBack  from "@/components/view/historyorder/feedBack.vue";
import NotFinishedOrder from "@/components/view/historyorder/notFinishedOrder.vue";
import PendingPaymentOrder from "@/components/view/historyorder/pendingPaymentOrder.vue";
import PaidOrder from "@/components/view/historyorder/paidOrder.vue";
import MoneyDetails from "@/components/view/historyorder/moneyDetails.vue"

// user
import PersonalUser from "@/components/view/user/personalUser.vue"
import UserGuide from "@/components/view/user/userGuide.vue"
import SettingsPage from "@/components/view/user/settingsPage.vue";
import PersonalStatistics from "@/components/view/user/personalStatistics.vue";
import AboutPage from "@/components/view/user/aboutPage.vue";
import PrivacyAgreement from "@/components/view/user/privacyAgreement.vue";
import LicenseInformation from "@/components/view/user/licenseInformation.vue";
import WithdrawCash from "@/components/view/user/withdrawCash.vue";
import WithdrawalRecord from "@/components/view/user/withdrawalRecord.vue";
import DetailRecord from "@/components/view/user/detailRecord.vue";

// wallet
import WalletIndex from '@/components/view/wallet/walletindex.vue'
import SecretFree from '@/components/view/wallet/secretfree.vue'
import BankCard from '@/components/view/wallet/bankcard.vue'
import OpenSecretfree from '@/components/view/wallet/openSecretfree.vue'
import aaa from '@/components/view/wallet/test02.vue'

// news
import NewIndex from '@/components/view/news/newIndex.vue'
import Appeal from '@/components/view/news/appeal.vue'
import Result from '@/components/view/news/result.vue'
import Pass from '@/components/view/news/pass.vue'
import HeatMap from '@/components/view/news/heatMap.vue'
import DriverChatMessage from '@/components/view/news/DriverChatMessage.vue'


const router = new Router({
    mode: 'history', // 使用HTML5 History模式
    routes: [

        {
            path: '/',
            component: LoginPage,
        },
        {
            path: '/homeIndex',
            component: HomeIndex,
        },
        // wallet
        {
            path: '/walletindex',
            component: WalletIndex,
        },
        {
            path: '/secretfree',
            name: '/secretfree',
            component: SecretFree,
        },
        {
            path: '/bankcard',
            component: BankCard,
        },
        {
            path: '/openSecretfree',
            component: OpenSecretfree,
        },
        {
            path: '/aaa',
            component: aaa,
        },


        // homepage

        {
            path: '/GetOrder',
            component: GetOrder,
        },
        // 去乘客的位置
        {
            path: '/ItineraryDetails',
            component: ItineraryDetails,
        },
        {
            path: '/nearby',
            component: Nearby,
        },
        // 上车后
        {
            path: '/OnCar',
            component: OnCar,
        },
        // 安全中心
        {
            path: '/SecurityCenter',
            component: SecurityCenter,
        },
        // 订单结算页
        {
            path: '/ArriveAtDestination',
            component: ArriveAtDestination,
        },
        // 订单结束页
        {
            path: '/EndOrder',
            component: EndOrder,
        },



        // historyorder
        {

            path: '/history',
            component: HistoryIndex,
        },
        {
            path: '/feedback',
            component: FeedBack,
        },
        {
            path: '/notFinishedOrder',
            component: NotFinishedOrder,
        },
        {
            path: '/pendingPaymentOrder',
            component: PendingPaymentOrder,
        },
        {
            path: '/paidOrder',
            component: PaidOrder,
        },
        {
            path: '/moneyDetails',
            component: MoneyDetails,
        },


        // user
        {
            path: '/personalUser',
            component: PersonalUser,
        },
        {
            path: '/userGuide',
            component: UserGuide,
        },
        {
            path: '/settingsPage',
            component: SettingsPage
        },
        {
            path: '/personalStatistics',
            component: PersonalStatistics
        },
        {
            path: '/aboutPage',
            component: AboutPage
        },
        {
            path: '/privacyAgreement',
            component: PrivacyAgreement
        },
        {
            path: '/licenseInformation',
            component: LicenseInformation
        },
        {
            path: '/withdrawCash',
            component: WithdrawCash
        },
        {
            path: '/withdrawalRecord',
            component: WithdrawalRecord
        },
        {
            path: '/detailRecord',
            component: DetailRecord
        },
        {
            path: '/registerPage',
            component: RegisterPage
        },



        // news
        {
            path: '/newIndex',
            component: NewIndex,
        },
        {
            path: '/appeal',
            component: Appeal,
        },
        {
            path: '/Result',
            component: Result,
        },
        {
            path: '/pass',
            component: Pass,
        },
        {
            path: '/heatMap',
            component: HeatMap,
        },
        {
            path: '/DriverChatMessage',
            component: DriverChatMessage,
        },

    ]

})

export default router
